package com.pro.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Arrays;
import java.util.Date;
import java.util.Objects;

public class JsUser{
    private Integer userId;//自增主键
    private String trueName;//用户真实姓名
    private String sex;//用户性别
    private String account;//用户账号唯一
    private String acatarUrl;//头像url路径
    private String email;//邮箱地址
    private String password;//密码
    private String remark;//备注
    private Integer enabled;//是否启用，1yes，2no
    private String phone;//手机号
    private String idCard;//身份证号码

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthDate;//出生日期


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date registerDate;//注册时间

    private String registerIp;//注册时ip地址
    private Integer status;//状态，1使用中，2已注销，3冻结，4封停
    private Integer grade;//等级
    private Long wages;//工资

    private Integer deptId;//部门id，外键
    private String freestyle;//个性签名
    private String deptName;//部门名称
    private String loginAddress;//登陆地区
    private String loginIp;//登录ip

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date loginDate;//登陆时间

    private String trName; //权限名称
    private Integer authorityId;    //权限id
    private Integer[] authorityIdd;
    private Integer createId;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;//创建时间

    private String unsealDate;
    private String endDate;
    private Integer type;

    public JsUser() {
    }

    public JsUser(Integer userId, String trueName, String sex, String account, String acatarUrl, String email, String password, String remark, Integer enabled, String phone, String idCard, Date birthDate, Date registerDate, String registerIp, Integer status, Integer grade, Long wages, Integer deptId, String freestyle, String deptName, String loginAddress, String loginIp, Date loginDate, String trName, Integer authorityId, Integer[] authorityIdd, Integer createId, Date createDate, String unsealDate, String endDate, Integer type) {
        this.userId = userId;
        this.trueName = trueName;
        this.sex = sex;
        this.account = account;
        this.acatarUrl = acatarUrl;
        this.email = email;
        this.password = password;
        this.remark = remark;
        this.enabled = enabled;
        this.phone = phone;
        this.idCard = idCard;
        this.birthDate = birthDate;
        this.registerDate = registerDate;
        this.registerIp = registerIp;
        this.status = status;
        this.grade = grade;
        this.wages = wages;
        this.deptId = deptId;
        this.freestyle = freestyle;
        this.deptName = deptName;
        this.loginAddress = loginAddress;
        this.loginIp = loginIp;
        this.loginDate = loginDate;
        this.trName = trName;
        this.authorityId = authorityId;
        this.authorityIdd = authorityIdd;
        this.createId = createId;
        this.createDate = createDate;
        this.unsealDate = unsealDate;
        this.endDate = endDate;
        this.type = type;
    }

    public Integer getUserId() {
        return userId;
    }

    public String getTrueName() {
        return trueName;
    }

    public String getSex() {
        return sex;
    }

    public String getAccount() {
        return account;
    }

    public String getAcatarUrl() {
        return acatarUrl;
    }

    public String getEmail() {
        return email;
    }

    public String getPassword() {
        return password;
    }

    public String getRemark() {
        return remark;
    }

    public Integer getEnabled() {
        return enabled;
    }

    public String getPhone() {
        return phone;
    }

    public String getIdCard() {
        return idCard;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public Date getRegisterDate() {
        return registerDate;
    }

    public String getRegisterIp() {
        return registerIp;
    }

    public Integer getStatus() {
        return status;
    }

    public Integer getGrade() {
        return grade;
    }

    public Long getWages() {
        return wages;
    }

    public Integer getDeptId() {
        return deptId;
    }

    public String getFreestyle() {
        return freestyle;
    }

    public String getDeptName() {
        return deptName;
    }

    public String getLoginAddress() {
        return loginAddress;
    }

    public String getLoginIp() {
        return loginIp;
    }

    public Date getLoginDate() {
        return loginDate;
    }

    public String getTrName() {
        return trName;
    }

    public Integer getAuthorityId() {
        return authorityId;
    }

    public Integer[] getAuthorityIdd() {
        return authorityIdd;
    }

    public Integer getCreateId() {
        return createId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public String getUnsealDate() {
        return unsealDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public Integer getType() {
        return type;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public void setTrueName(String trueName) {
        this.trueName = trueName;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public void setAcatarUrl(String acatarUrl) {
        this.acatarUrl = acatarUrl;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public void setEnabled(Integer enabled) {
        this.enabled = enabled;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }

    public void setRegisterIp(String registerIp) {
        this.registerIp = registerIp;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    public void setWages(Long wages) {
        this.wages = wages;
    }

    public void setDeptId(Integer deptId) {
        this.deptId = deptId;
    }

    public void setFreestyle(String freestyle) {
        this.freestyle = freestyle;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public void setLoginAddress(String loginAddress) {
        this.loginAddress = loginAddress;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }

    public void setTrName(String trName) {
        this.trName = trName;
    }

    public void setAuthorityId(Integer authorityId) {
        this.authorityId = authorityId;
    }

    public void setAuthorityIdd(Integer[] authorityIdd) {
        this.authorityIdd = authorityIdd;
    }

    public void setCreateId(Integer createId) {
        this.createId = createId;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public void setUnsealDate(String unsealDate) {
        this.unsealDate = unsealDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "JsUser{" +
                "userId=" + userId +
                ", trueName='" + trueName + '\'' +
                ", sex='" + sex + '\'' +
                ", account='" + account + '\'' +
                ", acatarUrl='" + acatarUrl + '\'' +
                ", email='" + email + '\'' +
                ", password='" + password + '\'' +
                ", remark='" + remark + '\'' +
                ", enabled=" + enabled +
                ", phone='" + phone + '\'' +
                ", idCard='" + idCard + '\'' +
                ", birthDate=" + birthDate +
                ", registerDate=" + registerDate +
                ", registerIp='" + registerIp + '\'' +
                ", status=" + status +
                ", grade=" + grade +
                ", wages=" + wages +
                ", deptId=" + deptId +
                ", freestyle='" + freestyle + '\'' +
                ", deptName='" + deptName + '\'' +
                ", loginAddress='" + loginAddress + '\'' +
                ", loginIp='" + loginIp + '\'' +
                ", loginDate=" + loginDate +
                ", trName='" + trName + '\'' +
                ", authorityId=" + authorityId +
                ", authorityIdd=" + Arrays.toString(authorityIdd) +
                ", createId=" + createId +
                ", createDate=" + createDate +
                ", unsealDate='" + unsealDate + '\'' +
                ", endDate='" + endDate + '\'' +
                ", type=" + type +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        JsUser jsUser = (JsUser) o;
        return Objects.equals(userId, jsUser.userId) &&
                Objects.equals(trueName, jsUser.trueName) &&
                Objects.equals(sex, jsUser.sex) &&
                Objects.equals(account, jsUser.account) &&
                Objects.equals(acatarUrl, jsUser.acatarUrl) &&
                Objects.equals(email, jsUser.email) &&
                Objects.equals(password, jsUser.password) &&
                Objects.equals(remark, jsUser.remark) &&
                Objects.equals(enabled, jsUser.enabled) &&
                Objects.equals(phone, jsUser.phone) &&
                Objects.equals(idCard, jsUser.idCard) &&
                Objects.equals(birthDate, jsUser.birthDate) &&
                Objects.equals(registerDate, jsUser.registerDate) &&
                Objects.equals(registerIp, jsUser.registerIp) &&
                Objects.equals(status, jsUser.status) &&
                Objects.equals(grade, jsUser.grade) &&
                Objects.equals(wages, jsUser.wages) &&
                Objects.equals(deptId, jsUser.deptId) &&
                Objects.equals(freestyle, jsUser.freestyle) &&
                Objects.equals(deptName, jsUser.deptName) &&
                Objects.equals(loginAddress, jsUser.loginAddress) &&
                Objects.equals(loginIp, jsUser.loginIp) &&
                Objects.equals(loginDate, jsUser.loginDate) &&
                Objects.equals(trName, jsUser.trName) &&
                Objects.equals(authorityId, jsUser.authorityId) &&
                Arrays.equals(authorityIdd, jsUser.authorityIdd) &&
                Objects.equals(createId, jsUser.createId) &&
                Objects.equals(createDate, jsUser.createDate) &&
                Objects.equals(unsealDate, jsUser.unsealDate) &&
                Objects.equals(endDate, jsUser.endDate) &&
                Objects.equals(type, jsUser.type);
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(userId, trueName, sex, account, acatarUrl, email, password, remark, enabled, phone, idCard, birthDate, registerDate, registerIp, status, grade, wages, deptId, freestyle, deptName, loginAddress, loginIp, loginDate, trName, authorityId, createId, createDate, unsealDate, endDate, type);
        result = 31 * result + Arrays.hashCode(authorityIdd);
        return result;
    }
}